const sendEmailForm = document.getElementById("#emailSendTextForm"),
    forwardArrowBtn = document.querySelector(".forwardArrow"),
    backwardArrowBtn = document.querySelector(".backwardArrow"),
    sendEmailBtn = document.querySelector(".sendEmailBtn"),
    info = document.querySelector(".info"),
    authorInfo = document.querySelector(".authorInfo"),
    senderContainer = document.querySelector(".authorForm"),
    senderUser = document.querySelector(".emailSender");


forwardArrowBtn.addEventListener('click', () => {
    info.classList.add('hidden');
    forwardArrowBtn.classList.add('hidden');
    authorInfo.classList.remove('hidden');
    backwardArrowBtn.classList.remove('hidden');
})

backwardArrowBtn.addEventListener('click', () => {
    info.classList.remove('hidden');
    forwardArrowBtn.classList.remove('hidden');
    authorInfo.classList.add('hidden');
    backwardArrowBtn.classList.add('hidden');
})

sendEmailBtn.addEventListener('click', function(event) {
    const sender = senderContainer.querySelector('#id_author');
    if (senderUser.innerHTML === "") {
        senderUser.innerHTML = "LogOutUser";
    }
    sender.value = senderUser.innerHTML

    // event.preventDefault()
    sendEmailForm.classList.add('hidden')
    sendEmailBtn.style.visibility = 'hidden'
})